// ============================== 导入依赖 ============================== //

import CORE from '@/CORE'
import Client from '@api/base/api/EmergencyPlanApi'

import SubmitClass from '@api/base/model/EmergencyPlanSendReq'

const CLIENT = CORE.grpcCLIENT(Client)

// ============================== 导出远程接口 ============================== //

export default {
  // —————————————————————————————— 列表 —————————————————————————————— //

  async submit(one, TIP = '预案发送') {
    const DTO = CORE.grpcDTO(SubmitClass, { planId: one.id })
    await CORE.grpc(TIP, CLIENT, 'emergencyPlanSend', DTO)
    return `${TIP}：已提交`
  },
}
